-
Notifications
You must be signed in to change notification settings - Fork 11.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update and clarify documentation comments #5206
Update and clarify documentation comments #5206
Conversation
|
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
contracts/utils/cryptography/RSA.sol
Outdated
@@ -30,7 +30,7 @@ library RSA { | |||
* method described in https://datatracker.ietf.org/doc/html/rfc8017#section-8.2.2[section 8.2.2 of RFC8017]. | |||
* | |||
* IMPORTANT: Although this function allows for it, using n of length 1024 bits is considered unsafe. | |||
* Consider using at least 2048 bits. | |||
* Consider using at least 2048 bits. Additionally, this function only supports SHA256 as the hash function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of removing this note and rename the function to pkcs1Sha256
just as its bytes counterpart. That was the original naming iiurc but I proposed renaming it while ignoring the AlgorithmIdentifier is included during signature creation
According to N-10, we should enforce 2048 bits in RSA. I updated accordingly since I do think we should enforce it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing this file is not ok. The entier point is to take an unmodified reference (standard) and using it for tests. If any entry in this file causes an issue, the parsing/filtering should take care of that in a predictable way, but this should not change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a comment explaining how rsa key are generated using openssl (in the openssl test).
LGTM
`` |
Fixes N-06, N-08, N-10 and N-13
PR Checklist
npx changeset add
)